]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Add Source.pushNotification method
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 28 Feb 2011 18:13:32 +0000 (13:13 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Mar 2011 22:42:55 +0000 (18:42 -0400)
This allows clients to make minor adjustments to their notification
content without triggering a new popup.

https://bugzilla.gnome.org/show_bug.cgi?id=642793

js/ui/messageTray.js

index 4f2512238dbfb565d993f41b44925310bc5649db..8a29597de7fa42451aec9b1715c43f9c2b50732f 100644 (file)
@@ -844,12 +844,13 @@ Source.prototype = {
         return this._iconBin;
     },
 
-    notify: function(notification) {
+    pushNotification: function(notification) {
         if (this.notification) {
             this.notification.disconnect(this._notificationClickedId);
             this.notification.disconnect(this._notificationDestroyedId);
         }
 
+        // FIXME: Right now, we don't save multiple notifications.
         this.notification = notification;
 
         this._notificationClickedId = notification.connect('clicked', Lang.bind(this, this.open));
@@ -862,7 +863,10 @@ Source.prototype = {
                     this._notificationRemoved();
                 }
             }));
+    },
 
+    notify: function(notification) {
+        this.pushNotification(notification);
         this.emit('notify', notification);
     },